<html>
<head>
<link href="../../Objects/sofa_white.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="contenu">		
		<center><h3>Tutorial Topology Quad2TriangleTopologicalMapping</h3></center>
	        <center><img src="TopologyQuad2TriangleTopologicalMapping_01.png" width="300" name="TopologyQuad2TriangleTopologicalMapping" align="middle"></center>		  
	<br>	
	<div id="orangeText">Description</div>
	<br>
<div align="left">
	The aim of this tutorial is to show the interest of using a topological mapping between two 2D surface meshes. In this tutorial, a soft cube is represented, implying:
	  <ul>
		<li>A mesh loader to read mesh file.</li>
		<li>A mechanicalObject with geometry point positions.</li>
		<li>A mass for gravity and fixed points.</li>
		<li>A FEM forcefield to create interactions between points</li>
		<li>An ODE scheme and a linear solver to solve the system at each time step.</li>
		<li>Dynamic topological components.</li>
		<li>A visual model which reproduces the current model geometry thanks to the identity mapping.</li>
	</ul>
        <br>
	<div id="orangeText">Key points</div>
	<br>
	Under the first node representing the quad mesh, a second node is used to represent the triangle mesh.
	<br>
	This is not the same case as a topological mapping with different dimension. In this case, both topologies are 2D surfaces. Thus, the triangulation will split each quad into 2 adjacent triangles.
	<br>
	Triangle edges are represented in yellow in the simulation. Display the scene in wire frame to see the quads.
	<br>
	<br>
	To create this mapping, the component <b>Quad2TriangleTopologicalMapping</b> is used. This component takes an input topology (Data Object1) which is the container of the "upper" topology (quad here) and has an output topology (Data Object2) which is the container of the above topology (triangle here).
	<br>	
	<br>
	<div id="orangeText">Results</div>
	<br>
	In this simulation, no forcefield is linked to the quads, showing that the "above" topology can be used as a base for the simulation. (useful when a more precise topology is wanted)
	<br>
	Try to remove either the <b>TriangularBendingSprings</b> or <b>TriangularFEMForceField </b>component. The result will be a completely stretched tissue.
	<br>
	<center><img src="TopologyQuad2TriangleTopologicalMapping_02.png" width="300" name="TopologyQuad2TriangleTopologicalMapping" align="middle">
	</center>
	<br>
	<ul>
	  <li><div id="orangeText">Additional results</div></li>	
	<br>
	When deleting triangles, the topological mapping is updated, and so is the list of quads.
	</ul>
</div>
</div>
</body>
</html>
